<template>
  <div>
    <el-row :gutter="24">
      <el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
        <el-form :model="ruleForm" :rules="rules2" ref="ruleForm" label-width="150px" class="demo-ruleForm" :hide-required-asterisk="true">
          <el-row :gutter="24">
            <!-- <el-col :xs="24">
                            <el-form-item label="Auth Keys" prop="authKeys" class="spread">
                                <el-input v-model="ruleForm.authKeys" type="text"></el-input>
                            </el-form-item>
                        </el-col> -->
            <el-col :xs="24">
              <el-form-item label="Auth value" prop="authValue" class="spread">
                <div style="display:flex">
                  <el-input v-model="ruleForm.authValue"></el-input>
                  <el-button type="primary" size="small" style="margin-left:15px">测 试</el-button>
                </div>
              </el-form-item>
            </el-col>
            <!-- <el-col :xs="24" style="visibility: hidden">
                            <el-form-item label="Auth Keys" prop="authKeys" class="spread">
                                <el-input v-model="ruleForm.authKeys" type="text"></el-input>
                            </el-form-item>
                        </el-col> -->
            <el-col :xs="24">
              <el-form-item>
                <!-- <el-button @click="handleReset('ruleForm')">重 置</el-button> -->
                <el-button type="primary" @click="handleSave('ruleForm')">{{ $t("common.preservation") }}</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-col>

    </el-row>

  </div>
</template>

<script>
export default {
  data () {
    return {
      ruleForm: {
        authKeys: '',
        authValue: '',
      },
      rules2: {
        // authKeys:[{ required: true, message: '请输入Auth Keys', trigger: 'blur' }],
        authValue: [{ required: true, message: '请输入Auth value', trigger: 'blur' }],
      }
    }
  },
  created () {

  },
  methods: {
    handleSave (formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {

        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    handleReset (formName) {
      this.$refs[formName].resetFields();
    },
  }
}
</script>
<style scoped>
.form {
  width: 50%;
}
.spread >>> .el-select {
  width: 100%;
}
</style>